package com.zrrd.mcl.order.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zrrd.mcl.model.order.OrderInfo;

public interface OrderService extends IService<OrderInfo> {

    //保存订单
    Long saveOrderInfo(OrderInfo orderInfo);

    //生成流水号
    String getTradeNo(String userId);

    //比较流水号
    boolean checkTradeNo(String userId,String tradeCode);

    //删除流水号
    void deleteTradeNo(String userId);

    //验证库存
    boolean checkStock(Long skuId, Integer skuNum);

    //根据订单id查询订单信息
    OrderInfo getOrderInfo(Long orderId);

    //获取我的订单
    Page<OrderInfo> getMyOrder(Integer pageNum, Integer pageSize,String UserId);

}
